package com.pango.core.interceptors;

import java.lang.reflect.Method;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

import com.pango.core.utils.ReflectHelper;


public class DataOperationInterceptor implements MethodInterceptor{
    public DataOperationInterceptor() {
    }
    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        Method method = methodInvocation.getMethod();
        String methodName = method.getName();
        Class<?> cls = method.getDeclaringClass();
        Object service = methodInvocation.getThis();
        Object[] args = methodInvocation.getArguments();
        for (Object object : args) {
        	ReflectHelper h = new ReflectHelper(object);
        	//h.setMethodValue("orgid","1");
		}
		return methodInvocation.proceed(); 
    }
}